back

CodeWithRahul

More
  • Home
  • Cources
  • Tutorials
  • Tutorials
  • Projects
  • Notes
  • Contact
  • Work With Us
  • HTML
  • CSS
  • JAVASCRIPT
  • CC++
  • PHP
  • PYTHON
  • REACT JS
  • DSA

RahulGoswami.com

Create an account
  • INTRODUCTION
    • HTML Introduction
    • HTML Working
    • HTML Prerequisite
    • HTML Document
    • HTML Structure 1
    • HTML Page
    • HTML Structure 2
    • HTML Editor
    • HTML View Source
    • HTML Tags
    • HTML Element
    • VS Code
    • installation
  • HTML BASIC TAGS
    • Skeletal Tags
    • Heading Tags
    • Paragraph Tag
    • Horizontal Line Tag
    • Line Break Tag
    • Center Tag
    • Preserve
    • Formatting Tag
  • HTML FORMATTING TAGS
    • Monospaced Font
    • Text Abbreviation Tag
    • Acronym Tag
    • Text tags
  • HTML QUOTATIONS
    • Blockquote Tag
    • Quote Tag
    • Text Citation Tag
    • Text Direction Tag
    • Address Text Tag
    • Code Tag
  • HTML ATTRIBUTES
    • HTML Attributes
    • HTML Core
    • Attributes 1
    • Attributes 2
    • HTML Generic
  • HTML LINKS
    • HTML Links
  • HTML COMMENTS
    • HTML Comments
  • HTML IMAGES
    • HTML Images
  • HTML LISTS
    • HTML Lists
    • HTML Unordered List
    • HTML Ordered List
    • HTML Definition List
  • HTML TABLES
    • HTML Tables
  • HTML BLOCK ELEMENT
    • HTML Block
    • Elements
  • HTML INLINE ELEMENT
    • HTML Inline
    • Elements
  • HTML FORMS
    • FORM Introduction
    • More on forms

    HTML Ordered List

    OrderedList Image

    Syntext:

    <ol>
    // list items
    <ol/>
    
    • Ordered lists have a sequence.
    • They are a more like numbered list.
    • They are created by using the <ol> tag.
    • For items, we use <li> tag also known as the List Item tag.

    Example :

    <ol>
    <li>Mango<li/>
    <li>Orange<li/>
    <li>Litchi<li/>
    <li>Banana<li/>
    <ol/>
    

    output:

    • Mango
    • Orange
    • Litchi
    • Banana

    Setting type attribute:

    For <ol> tag, the type attribute is used to specify the type of numbering we want.

    There are five options:

    1. Uppercase Roman Numerals
    2. Lowercase Roman Numerals
    3. Numerals
    4. Lowercase Letters
    5. Uppercase Letters

    Setting start attribute:

    For <ol> tag, the style attribute is used to specify the starting type of numbering.

    Example :

    <ol type="A" start="3">
    <li>Pen<li/>
    <li>Pencil<li/>
    <li>Eraiser<li/>
    <ol/>
    

    output:

    C. Pen
    D. Pencil
    E. Eraiser
    Owner of this WebPage Image

    CodeWithRahul

    Copyright © 2023 CodeWithRahul.com